import java.sql.*;
public class EX114 {
	public static void main(String[] args) {
		Connection conn=null;
		Statement st=null;
		ResultSet rs = null;
		String url="jdbc:oracle:thin:@127.0.0.1:1521:XE";
		String user="system";
		String pwd="12345";
		int num,dan;
		String code,name;
		
		try {
			Class.forName("oracle.jdbc.driver.OracleDriver");
			conn = DriverManager.getConnection(url,user,pwd);
			st = conn.createStatement();
			String sql = "SELECT * FROM jepum ORDER BY name ASC";
			
			rs = st.executeQuery(sql);
			while(rs.next()){
				num=rs.getInt("num");
				code=rs.getString("code");
				name=rs.getString("name");
				dan=rs.getInt("dan");
				System.out.println(num+"\t"+code+"\t"+name+"\t"+dan);
			}
		} catch(Exception e){
			e.printStackTrace();
		}
	}

}
